import React from "react";

//定义工具组件
interface MyToolProps {
    data: string,
    user: User
}

// 定义用户数据
interface User {
    name: string;
    age: number;
    city: string;
}

const MyTool: React.FC<MyToolProps> = (MyToolProps) => {
    return (
        <div className="myTool">
            这是工具栏 --{MyToolProps.data}
            <div>{MyToolProps.user.name}</div>
            <div>{MyToolProps.user.age}</div>
            <div>{MyToolProps.user.city}</div>
        </div>
    );
};

//暴露该组件
export default MyTool;
